#ifndef ROBOT_H_
#define ROBOT_H_

#include <iostream>

#include "ActiveGhost.h"

class Robot : public ActiveGhost
{
public:
    Robot(Position position, SimulatorRegister * registration = 0) : ActiveGhost(position, registration)
    {
            spawnPosition = position;
    };
    
    virtual ~Robot(){};

    void onCollide(const Ghost * ghost){};
    void onContact(const Ghost * ghost){};    
    void spawn()
    {
        std::cout << "Robot has spawned on the world" << std::endl;
    };
    void die(){};
    
    void scheduleSpawn()
    {
        if(isBound())
            this->requestPosition(spawnPosition);
        else
            std::cout << "Nothing to spawn to" << std::endl;
    };
    
    void scheduleUp()
    {
        Direction direction;
        direction.addUp();
    
        requestMove(direction);
    };
    
    void scheduleDown()
    {
        Direction direction;
        direction.addDown();
        
        requestMove(direction);
    };
    
    void scheduleLeft()
    {
        Direction direction;
        direction.addLeft();
        
        requestMove(direction);
    };
    
    void scheduleRight()
    {
        Direction direction;
        direction.addRight();
        
        requestMove(direction);
    };
    
private:
    unsigned int life;
    Position spawnPosition;
};

#endif /*ROBOT_H_*/

